home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 5
/
Amiga Plus Sonderheft 1996 #5.iso
/
programme
/
chaospro_v3.0
/
rexx
/
calcpics
< prev
next >
Wrap
Text File
|
1987-11-25
|
2KB
|
85 lines
/* Calculate all pictures contained in a directory */
options results
address rexx
ADDLIB ("rexxsupport.library")
ADDRESS command
requestfile 'ChaosPro:' 'TITLE="Choose a fractal data directory"' DRAWERSONLY 'PUBSCREEN=ChaosPro-Fractalscreen' '> t:delme2'
ADDRESS ChaosPro.Rexx
ChoiceRequest "Format" "2x2|3x3|4x4|Abort"
if rc=8 then exit
format=result
ADDRESS command
success = OPEN("quak","t:delme2","Read")
/* war es erfolgreich? */
line = Readln("quak")
success = close("quak")
delete 't:delme2' '> nil:'
if line="" then exit
list line 'lformat="%s%s"' '> t:delme'
success = OPEN("filelist","t:delme","Read")
if success=0 then exit
cnt=0
do forever
line = READLN("filelist")
if line="" then break
cnt=cnt+1
end
success = close("filelist")
if format=1 then do
num_horiz=2
num_vert=2
end
if format=2 then do
num_horiz=3
num_vert=3
end
if format=3 then do
num_horiz=4
num_vert=4
end
success = OPEN("filelist","t:delme","Read")
if success=0 then exit
x=0
y=0
w=10000/num_horiz
h=10000/num_vert
address ChaosPro.Rexx
PicNum=0
do forever
line = READLN("filelist")
if line="" then break
LoadPicData line
Picture.PicNum=result
if rc=0 then
CalcFract Picture.PicNum x y w h
x=x+w
if x+w>10000 then do
x=0
y=y+h
end
PicNum=PicNum+1
if y+h>10000 then do
x=0
y=0
ChoiceRequest "Continue?" "Yes|Abort"
if result=0 then do
close("filelist")
address command
delete 't:delme' '> nil:'
exit
end
PicNum=PicNum-1
do while PicNum>=0
DelPicture Picture.PicNum
PicNum=PicNum-1
end
PicNum=0
end
end
lab1:
success = close("filelist")
address command
delete 't:delme' '> nil:'
exit